Java.sql.date,java.sql.time and Java.sql.Timestamp Three are subclasses of Java.util.Date (wrapper class). Java.sql.Date is a subclass of Java.util.Date, a thin wrapper that wraps a millisecond value, allowing JDBC to identify the millisecond value
Select GETDATE () as ' current date ',Datename (Year,getdate ()) as ' year ',Datename (Month,getdate ()) as ' month ',Datename (Day,getdate ()) as ' Day ',Datename (Dw,getdate ()) as ' Week ',Datename (Week,getdate ()) as ' Week number ',Datename
This article is reproduced from: http://www.blogjava.net/gf7/archive/2012/07/01/381933.html
function trunc is an Oracle-built function that can be "tailored" to date type data to accommodate different types of data requirements.
In the previous
//////by the number of seconds to get the date a few days a few hours ... //////Number of seconds///0: Converted with seconds, 1: No seconds after conversion///a few days, hours, minutes, seconds . Public Static stringParsetimeseconds (intTinttype) {
1. Get the current month and day ... Methods of information1 Public classCommondate {2 3 Public FinalString year =string.valueof (Calendar.getinstance (). Get (Calendar.year));4 Public FinalString month = string.valueof
PHP calculates the difference between two time periods (in seconds, hour, day, month, and year)
Sample Code of the month difference between two time periods:
The Code is as follows:
$ Yourdate = "2012-10-20 ";$
The unit of time can be from very small to great, the following description is to convey a feeling of a large time span.A second (One-zero seconds of One-zero)The scientists timed the instantaneous events with a few seconds.Researchers have used
======================== Thanks for "Don't forget Beginner's mind" The Great God share ========================Original Blog Address: http://www.cnblogs.com/IT-Bear/archive/2012/01/16/2323609.html=========================================== ==========
1. Use the CTime class (get system current time, accurate to seconds)CString str; // Get system Time CTime tm;tm=ctime::getcurrenttime (); // Gets the system date Str=tm. Format (" now time is%y year%m month%d day%x"); MessageBox (STR,NULL,MB_OK);A,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.